package tech.aistar.corejava.day10.myexception;

/**
 * Created by 李雨昂 on 2019/7/22.
 */

//	测试类
public class AccountTest {
    public static void main(String[] args) {
        //1.储蓄账户
        Account acc1 = new Account(1, "tom", 123, "110", 100.0, 0);
        Account acc2 = new Account(2, "王静静", 123, "110", 100.0, 1);

        acc1.setAccTelno("1833893849");//setter方法可以多次进行赋值.
        //2.调用存钱的
        acc1.depoist(100.0);

        System.out.println(acc1.getAccBalance());

        System.out.println(acc1);

        //3. 调用取钱
        try {
            acc2.withdraw(100050.0);
        } catch (BalanceNotException e) {
            e.printStackTrace();//打印异常的堆栈信息
        }
        System.out.println(acc2.getAccBalance());
        System.out.println(acc2);
    }

}



